package com.hpeu_01.AtmApp;

import java.util.Scanner;

public class AtmDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Atm.show();
        Atm.login();
        boolean w = true;
        while (w) {
            //Atm.business();
            System.out.println("**********************************************");
            System.out.println("1:查询余额 2:存款 3:取款 4:转账 5:修改密码 6:退出 ");
            System.out.println("**********************************************");
            int choose = scanner.nextInt();
            switch (choose) {
                case 1:
                    double balance = Atm.balance();
                    System.out.println("当前余额：" +balance);
                    break;
                case 2:
                    Atm.deposit();
                    break;
                case 3:
                    Atm.withdrawal();
                    break;
                case 4:
                    Atm.transfer();
                    break;
                case 5:
                    Atm.changePassword();
                    break;
                case 6:
                    int dropout = Atm.dropout();
                    if (dropout==1){
                        w=false;
                    }
                    break;
                default:
                    System.out.println("请重新输入！");
            }
        }
    }
}
